//
//  LaunchViewController.m
//  liangyi
//
//  Created by 张水 on 16/12/14.
//  Copyright © 2016年 yswh. All rights reserved.
//

#import "LaunchViewController.h"

@interface LaunchViewController ()

@property(nonatomic,strong)UIImageView *imageView;

@end

@implementation LaunchViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.imageView = [[UIImageView alloc]initWithFrame:[UIScreen mainScreen].bounds];
    self.imageView.contentMode = UIViewContentModeScaleAspectFill;
    self.imageView.image = [UIImage imageNamed:@"load"];
    [self.view addSubview:self.imageView];
    [self animation];
}

-(void)animation {
    
    [UIView animateWithDuration:30.0 animations:^{
        self.imageView.frame = CGRectMake(-40, -40, kScreenWidth + 80 , kScreenHeight + 80);
    } completion:^(BOOL finished) {
        if (finished){
            self.imageView.frame = [UIScreen mainScreen].bounds;
            [self animation];
        }
    }];
    
}


@end
